using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Caching
{
    /// <summary>
    /// <para>Generate Map Server Cache Tiling Scheme</para>
    /// <para>Generates a custom tiling scheme file that defines the scale levels, tile dimensions, and other properties for a web tile layer.</para>
    /// <para>生成自定义切片方案文件，用于定义 Web 切片图层的比例级别、切片尺寸和其他属性。</para>
    /// </summary>    
    [DisplayName("Generate Map Server Cache Tiling Scheme")]
    public class GenerateMapServerCacheTilingScheme : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateMapServerCacheTilingScheme()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_map">
        /// <para>Map Document</para>
        /// <para>The current map or an existing .mxd document to be used for the tiling scheme.</para>
        /// <para>要用于切片方案的当前地图或现有 .mxd 文档。</para>
        /// </param>
        /// <param name="_tile_origin">
        /// <para>Tiling origin in map units</para>
        /// <para>The upper left corner of the tiling scheme, in coordinates of the spatial reference of the source data frame.</para>
        /// <para>切片方案的左上角，位于源数据框的空间参考坐标中。</para>
        /// </param>
        /// <param name="_output_tiling_scheme">
        /// <para>Output Tiling Scheme</para>
        /// <para>Path and file name of the tiling scheme file to create.</para>
        /// <para>要创建的切片方案文件的路径和文件名。</para>
        /// </param>
        /// <param name="_num_of_scales">
        /// <para>Number of Scales</para>
        /// <para>Number of scale levels in the tiling scheme.</para>
        /// <para>切片方案中的小比例级别数。</para>
        /// </param>
        /// <param name="_scales">
        /// <para>Scales</para>
        /// <para>Scale levels to include in the tiling scheme. These are not represented as fractions. Instead, use 500 to represent a scale of 1:500, and so on.</para>
        /// <para>要包含在切片方案中的缩放级别。这些不表示为分数。相反，请使用 500 表示 1：500 的比例，依此类推。</para>
        /// </param>
        /// <param name="_dots_per_inch">
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para>The dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.</para>
        /// <para>预期输出设备的每英寸点数。如果选择的 DPI 与输出设备的分辨率不匹配，则地图切片的比例将显示不正确。默认值为 96。</para>
        /// </param>
        /// <param name="_tile_size">
        /// <para>Tile Size</para>
        /// <para><xdoc>
        ///   <para>The width and height of the cache tiles in pixels. The default is 256 by 256. For the best balance between performance and manageability, avoid deviating from standard dimensions of 256 by 256 or 512 by 512.</para>
        ///   <bulletList>
        ///     <bullet_item>128 by 128 pixels—128 by 128 pixels</bullet_item><para/>
        ///     <bullet_item>256 by 256 pixels—256 by 256 pixels</bullet_item><para/>
        ///     <bullet_item>512 by 512 pixels—512 by 512 pixels</bullet_item><para/>
        ///     <bullet_item>1024 by 1024 pixels—1024 by 1024 pixels</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>缓存切片的宽度和高度（以像素为单位）。默认值为 256 x 256。为了在性能和可管理性之间取得最佳平衡，请避免偏离 256 x 256 或 512 x 512 的标准尺寸。</para>
        ///   <bulletList>
        ///     <bullet_item>128 x 128 像素 - 128 x 128 像素</bullet_item><para/>
        ///     <bullet_item>256 x 256 像素 - 256 x 256 像素</bullet_item><para/>
        ///     <bullet_item>512 x 512 像素 - 512 x 512 像素</bullet_item><para/>
        ///     <bullet_item>1024 x 1024 像素 - 1024 x 1024 像素</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GenerateMapServerCacheTilingScheme(object _in_map, object _tile_origin, object _output_tiling_scheme, long _num_of_scales, object _scales, long _dots_per_inch, _tile_size_value _tile_size)
        {
            this._in_map = _in_map;
            this._tile_origin = _tile_origin;
            this._output_tiling_scheme = _output_tiling_scheme;
            this._num_of_scales = _num_of_scales;
            this._scales = _scales;
            this._dots_per_inch = _dots_per_inch;
            this._tile_size = _tile_size;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Generate Map Server Cache Tiling Scheme";

        public override string CallName => "server.GenerateMapServerCacheTilingScheme";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_map, _tile_origin, _output_tiling_scheme, _num_of_scales, _scales, _dots_per_inch, _tile_size.GetGPValue()];

        /// <summary>
        /// <para>Map Document</para>
        /// <para>The current map or an existing .mxd document to be used for the tiling scheme.</para>
        /// <para>要用于切片方案的当前地图或现有 .mxd 文档。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Document")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_map { get; set; }


        /// <summary>
        /// <para>Tiling origin in map units</para>
        /// <para>The upper left corner of the tiling scheme, in coordinates of the spatial reference of the source data frame.</para>
        /// <para>切片方案的左上角，位于源数据框的空间参考坐标中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling origin in map units")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _tile_origin { get; set; }


        /// <summary>
        /// <para>Output Tiling Scheme</para>
        /// <para>Path and file name of the tiling scheme file to create.</para>
        /// <para>要创建的切片方案文件的路径和文件名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_tiling_scheme { get; set; }


        /// <summary>
        /// <para>Number of Scales</para>
        /// <para>Number of scale levels in the tiling scheme.</para>
        /// <para>切片方案中的小比例级别数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _num_of_scales { get; set; }


        /// <summary>
        /// <para>Scales</para>
        /// <para>Scale levels to include in the tiling scheme. These are not represented as fractions. Instead, use 500 to represent a scale of 1:500, and so on.</para>
        /// <para>要包含在切片方案中的缩放级别。这些不表示为分数。相反，请使用 500 表示 1：500 的比例，依此类推。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _scales { get; set; }


        /// <summary>
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para>The dots per inch of the intended output device. If a DPI is chosen that does not match the resolution of the output device, the scale of the map tile will appear incorrect. The default value is 96.</para>
        /// <para>预期输出设备的每英寸点数。如果选择的 DPI 与输出设备的分辨率不匹配，则地图切片的比例将显示不正确。默认值为 96。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dots(Pixels) Per Inch")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _dots_per_inch { get; set; }


        /// <summary>
        /// <para>Tile Size</para>
        /// <para><xdoc>
        ///   <para>The width and height of the cache tiles in pixels. The default is 256 by 256. For the best balance between performance and manageability, avoid deviating from standard dimensions of 256 by 256 or 512 by 512.</para>
        ///   <bulletList>
        ///     <bullet_item>128 by 128 pixels—128 by 128 pixels</bullet_item><para/>
        ///     <bullet_item>256 by 256 pixels—256 by 256 pixels</bullet_item><para/>
        ///     <bullet_item>512 by 512 pixels—512 by 512 pixels</bullet_item><para/>
        ///     <bullet_item>1024 by 1024 pixels—1024 by 1024 pixels</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>缓存切片的宽度和高度（以像素为单位）。默认值为 256 x 256。为了在性能和可管理性之间取得最佳平衡，请避免偏离 256 x 256 或 512 x 512 的标准尺寸。</para>
        ///   <bulletList>
        ///     <bullet_item>128 x 128 像素 - 128 x 128 像素</bullet_item><para/>
        ///     <bullet_item>256 x 256 像素 - 256 x 256 像素</bullet_item><para/>
        ///     <bullet_item>512 x 512 像素 - 512 x 512 像素</bullet_item><para/>
        ///     <bullet_item>1024 x 1024 像素 - 1024 x 1024 像素</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Size")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _tile_size_value _tile_size { get; set; }

        public enum _tile_size_value
        {
            /// <summary>
            /// <para>128 by 128 pixels</para>
            /// <para>128 by 128 pixels—128 by 128 pixels</para>
            /// <para>128 x 128 像素 - 128 x 128 像素</para>
            /// </summary>
            [Description("128 by 128 pixels")]
            [GPEnumValue("128 x 128")]
            _128_x_128,

            /// <summary>
            /// <para>256 by 256 pixels</para>
            /// <para>256 by 256 pixels—256 by 256 pixels</para>
            /// <para>256 x 256 像素 - 256 x 256 像素</para>
            /// </summary>
            [Description("256 by 256 pixels")]
            [GPEnumValue("256 x 256")]
            _256_x_256,

            /// <summary>
            /// <para>512 by 512 pixels</para>
            /// <para>512 by 512 pixels—512 by 512 pixels</para>
            /// <para>512 x 512 像素 - 512 x 512 像素</para>
            /// </summary>
            [Description("512 by 512 pixels")]
            [GPEnumValue("512 x 512")]
            _512_x_512,

            /// <summary>
            /// <para>1024 by 1024 pixels</para>
            /// <para>1024 by 1024 pixels—1024 by 1024 pixels</para>
            /// <para>1024 x 1024 像素 - 1024 x 1024 像素</para>
            /// </summary>
            [Description("1024 by 1024 pixels")]
            [GPEnumValue("1024 x 1024")]
            _1024_x_1024,

        }

        public GenerateMapServerCacheTilingScheme SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}